class Car:

    def __int__(self):
        self.color = None
        self.brand = None
        self.price = None
        self.type = None

    def info(self):
        print(f"我有一辆{XM_car.color}色的{XM_car.brand}，价值{XM_car.price}，是{XM_car.type}类型的")

XM_car = Car()
XM_car.brand = "小米SU7"
XM_car.color = "红"
XM_car.price = "25W"
XM_car.type = "油电混动"
XM_car.info()
